package ie.lawlor.amvc.controller;

import ie.lawlor.amvc.Triad;
import ie.lawlor.amvc.event.EventName;


public class EmitToChildEvent extends ControllerEventWrapper{
	
	protected String child;
	public EmitToChildEvent() {
		super();
	}
	public EmitToChildEvent(EventName componentEvent, EventName applicationEvent){
		super(componentEvent, applicationEvent);
	}
	public void addToController(Controller controller){
		controller.emitToChild(componentEvent, 
				applicationEvent,
				child,
        override);
	}
	
	/**
	 * @return Returns the child.
	 */
	public String getChild() {
		return child;
	}
	
	public void setChild(String child){
		this.child = child;
	}

    public void setChildTriad(Triad childTriad) {
      this.child = childTriad.getName();
    }
}